package com.weimob.service.impl;

import com.weimob.bean.User;
import com.weimob.service.OrderService;
import com.weimob.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author cyt
 * @create 2021-03-04 14:10
 */
@Service
public class OrderServiceImpl implements OrderService{

    @Autowired
    UserService userService;

    public List<User> initOrder(String userId) {
        // TODO Auto-generated method stub
        System.out.println("user-service-provider 用户id："+userId);
        //1、查询用户的收货地址
        List<User> addressList = userService.getUserAddressList(userId);
        for (User userAddress : addressList) {
            System.out.println(userAddress.toString());
        }
        return addressList;
    }
}
